import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/user/users/page',
    method: 'get',
    params: query
  })
}

export function createArticle(data) {
  return request({
    url: '/user/administer/user',
    method: 'post',
    data
  })
}

// export function fetchPv(pv) {
//   return request({
//     url: '/vue-element-admin/article/pv',
//     method: 'get',
//     params: { pv }
//   })
// }

export function deleteArticle(id) {
  return request({
    url: '/user/administer/users/delete',
    method: 'delete',
    // data,
    params: {
      id
    }
  })
}
// 修改用户信息
export function updateArticle(data) {
  return request({
    url: '/user/administer/message',
    method: 'put',
    data
  })
}
